// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import Vue from 'vue'
import FastClick from 'fastclick'
import router from './router/index'
import App from './App'
import store from './store'
import {XNumber, XButton, XInput, XHeader, Swiper} from 'vux'

FastClick.attach(document.body)
Vue.config.productionTip = false

Vue.component('x-number', XNumber)
Vue.component('x-button', XButton)
Vue.component('x-input', XInput)
Vue.component('x-header', XHeader)
Vue.component('swiper', Swiper)

router.beforeEach((to, from, next) => {
    if (from.name === 'EmailLogin') {
    }
    next()
})

/* eslint-disable no-new */
new Vue({
    store, // 在组件模板中用$store访问，在组件脚本中用this.$store访问
    router,
    render: h => h(App)
}).$mount('#app-box')
